import PmBaseInfo from '@/components/others/pm/pmBaseInfo'
import {useRouteQuery} from '@/hooks/pageRedirect'
import useMyPm from '@/hooks/pm/myPm'
import useOwner from '@/hooks/pm/owner'
import useGlobalAPI from '@/hooks/useGlobalAPI'
import {TargetBaseInfoPageQuery} from '@/libs/pageRedirect'
import { defineComponent, onMounted } from 'vue'

export default defineComponent({
  setup(props, ctx) {
    const {getQueryData, router} = useRouteQuery({queryKeys: ['defaultPmId','userDDId']})
    let pageQuery = getQueryData<TargetBaseInfoPageQuery>()
console.log(pageQuery);

    if (!pageQuery) {
      router.back()
      return () => <div></div>
    }

    const {userDDId: defaultUserDDId, defaultPmId} = pageQuery

    onMounted(() => {})

    return () =>
      defaultUserDDId ? (
        <PmBaseInfo userDDId={defaultUserDDId} defaultPmId={Number(defaultPmId)}></PmBaseInfo>
      ) : null
  }
})
